<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    {js:jquery}
    {js:validate}
    {js:dialog}
    {js:artTemplate}
    {js:form}
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link href="{webroot:public/css/twitter-bootstrap/3.3.7/css/bootstrap.min.css}" rel="stylesheet">
</head>

<body>
<div class="container">
    <form action="{url:/seller/live_update}" method="post" name='room' enctype="multipart/form-data">
        <table class='table'>
            <colgroup>
                <col width="170px" />
                <col />
            </colgroup>
            <tr>
                <th>房间名称：</th>
                <td><input type='text' class='form-control' value='' name='room_name' pattern="required"/><span class="help-block">直播室名称</span></td>
            </tr>
            <tr>
                <th>房间描述：</th>
                <td>
                    <textarea class='form-control' name='room_desc' pattern="required"></textarea><span class="help-block">直播室描述</span></td>
            </tr>
            <tr>
                <th>封面图片：</th>
                <td>
                    <input type='file' class='form-control' value='' name='room_img' />
                    <span class="help-block">直播室封面图片</span>
                    {if:isset($content['room_img']) && $content['room_img']}
                    <input type="hidden" name="room_img_update" value="{$content['room_img']}">
                    <img src="{url:$content['room_img']}" style='width:220px;border:1px solid #ccc' />
                    {else:}
                    <input type="hidden" name="room_img_update" value="">
                    {/if}
                </td>
            </tr>
            {if:$create == false}
            <tr>
                <th>审核状态：</th>
                <td>
                    {if:$status == 1}
                        <font color="green">通过</font>
                    {else:}
                        <font color="red">审核中</font>
                    {/if}
                </td>
            </tr>
            {/if}
            <tr>
                <th></th>
                <td>
                    <input type="submit" class="btn btn-success" value="保 存" />
                    <input type="button" class="btn btn-danger" value="取 消" onclick="art.dialog.close();" />
                </td>
            </tr>
        </table>
    </form>
</div>

<script type="text/javascript">
    {if:isset($content) && $content}
    var formObj = new Form('room');
    formObj.init({echo:JSON::encode($content)});
    {/if}
</script>

</body>
</html>